<?php
class Mail extends PHPMailer
{
	function __construct() {
        $this->CharSet = "UTF-8";
        $this->isSMTP();
        $this->SMTPDebug = 0;
        $this->Host = "ssl://smtp.mail.yahoo.com";
        $this->Port = 465;
        $this->SMTPAuth = true;
        $this->Username = "hoanglnn@yahoo.com";
        $this->Password = "Hoang123";
        $this->setFrom('hoanglnn@yahoo.com', 'Admin Fly High Social');
    }

    function layTuPost($POST){
        $tieuDe = $POST["header"];
        $noiDung = $POST["message"];
        $diaChiEmail = $POST["email"];
        $tenNguoiNhan = 'Thành viên Fly High';

        $this->addAddress($diaChiEmail, $tenNguoiNhan);
        $this->Subject = $tieuDe;
        $this->Body = $noiDung;
    }

    function guiThu(){
        if (!$this->send()) {
            return False;
        } else {
            return True;
        }
    }
}
?>